package com.hhs.FileUpload.entity;


import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;

/**
 * 附件表
 *
 * @author code@code.com
 * @date 2023-11-09 16:26:36
 */
@Setter
@Getter
@NoArgsConstructor
@Accessors(chain = true)
@TableName("sys_file")
public class FileInfo implements Serializable {

    private static final long serialVersionUID = 1L;

    public static final String FIELD_FILE_ID = "file_id";
    public static final String FIELD_BUSINESS_ID = "business_id";
    public static final String FIELD_BUS_MODE = "bus_mode";
    public static final String FIELD_SERVER_FILE_NAME = "server_file_name";
    public static final String FIELD_FILE_NAME = "file_name";
    public static final String FIELD_FILE_TYPE = "file_type";
    public static final String FIELD_FILE_URL = "file_url";
    public static final String FIELD_FILE_SIZE = "file_size";
    public static final String FIELD_SOURCE_TYPE = "source_type";
    public static final String FIELD_CHUNK_FLAG = "chunk_flag";
    public static final String FIELD_CHUNK_FOLDER = "chunk_folder";
    public static final String FIELD_CHUNK_MD5 = "chunk_md5";
    public static final String FIELD_SHARD_TOTAL = "shard_total";
    public static final String FIELD_SHARD_INDEX = "shard_index";
    public static final String FIELD_SHARD_SIZE = "shard_size";

    /**
     * 主键ID
     */
    @TableId
    private String fileId;
    /**
     * 业务主键ID
     */
    private String businessId;
    /**
     * 业务模块类型
     */
    private String busMode;
    /**
     * 对象存储服务器中的文件名
     */
    private String serverFileName;
    /**
     * 文件名称
     */
    private String fileName;
    /**
     * 文件类型
     */
    private String fileType;
    /**
     * 文件路径
     */
    private String fileUrl;
    /**
     * 文件大小(byte字节数)
     */
    private BigDecimal fileSize;
    /**
     * 来源类型
     */
    private String sourceType;
    /**
     * 分片标记: 分片-1;不分片-0;
     */
    private Boolean chunkFlag;
    /**
     * 分片文件夹
     */
    private String chunkFolder;
    /**
     * 分片的MD5加密
     */
    private String chunkMd5;
    /**
     * 分片总数量
     */
    private BigDecimal shardTotal;
    /**
     * 当前分片编号
     */
    private BigDecimal shardIndex;
    /**
     * 每个分片大小
     */
    private BigDecimal shardSize;

}
